namespace Trader.DataServices.FilesData
{
    using System.Collections.Generic;
    using System.Linq;

    public class FilesService : IFilesService
    {
        #region IFilesService Members

        public IList<IFile> GetStocksFiles()
        {
            string[] files =
                GetType().Assembly.GetManifestResourceNames().Where(resourceName => resourceName.EndsWith(".ASC")).
                    ToArray();
            var stockFiles = new List<IFile>();
            foreach (string file in files)
            {
                stockFiles.Add(new File(file));
            }
            return stockFiles;
        }

        #endregion
    }
}